package AI.screens
{
	import com.cheezeworld.AI.AISettings;
	import com.cheezeworld.AI.Behaviors.*;
	import com.cheezeworld.entity.*;
	import com.cheezeworld.rendering.MovingEntityRenderer;
	import com.cheezeworld.screens.IScreenItem;
	import com.cheezeworld.utils.Input;

	public class DodgeDemo extends AIDemoScreen
	{
		public function DodgeDemo(a_parentScreen:IScreenItem=null)
		{
			super(a_parentScreen);
			
			screenLabel = "Dodge";
			
			// Create some boids
			
			var boid:Boid;
			for( var i:int = 0; i < 6; i++ )
			{
				boid = _factory.getEntity( "Boid1", _gameworld ) as Boid;
				boid.newPos.Set( 250, 250 );
				boid.steering.addBehavior( new Dodge() );
				boid.steering.addBehavior( new Wander() );
			}
			
			boid.steering.addBehavior( new Arrive( Input.instance.worldMousePos, AISettings.arriveFast ) );
			boid.steering.addBehavior( new Dodge() );
			_factory.getRenderer( boid, MovingEntityRenderer );
			
		}	
		
	}
}